<template>
  <div>
    <el-dropdown>
      <span class="el-dropdown-link ml-4">
        <el-avatar
          :size="25"
          src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
        />
        <span class="ml-2 text-[#333] font-bold">张三</span>
      </span>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item>通知</el-dropdown-item>
          <el-dropdown-item @click="loginOut">退出登录</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>
<script setup>
import { useStore } from '@/store/index.ts'
import { useRouter } from 'vue-router'
const router = useRouter()
// const { LOGINAPI } = ApiModules
const { global } = useStore()
const loginOut = () => {
  global.setToken('')
  router.push('/login')
}
</script>
<style scoped lang="less">
.el-dropdown-link {
  display: flex;
  align-items: center;
  cursor: pointer;
}
</style>
